import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import * as Parse from 'parse'

@Component({
  selector: 'app-page-goodsdetail',
  templateUrl: './page-goodsdetail.component.html',
  styleUrls: ['./page-goodsdetail.component.scss']
})
export class PageGoodsdetailComponent {
  petgoods:any
  constructor(private route:ActivatedRoute){
    this.route.params.subscribe(async params=>{
      this.petgoods = await this.getPetGoodsById(params["id"])
    })
  }
  async getPetGoodsById(id:string){
    let query = new Parse.Query("PetGoods")
    return await query.get(id)
  }
}
